snmp_device_version

Synopsis

Returns vendor, os and version of an SNMP device.

Options

parameter required default choices comments
authkey no
    Authentication key, required if version is 3
    community no
      The SNMP community string, required if version is 2c
      host yes
        Typically set to {{ inventory_hostname }}
        integrity no
        • md5
        • sha
        Hashing algoritm, required if version is 3
        level no
        • authPriv
        • authNoPriv
        Authentication level, required if version is 3
        port no 161
          SNMP port number
          privacy no
          • des
          • 3des
          • aes
          • aes192
          • aes256
          Encryption algoritm, required if level is authPriv
          privkey no
            Encryption key, required if version is authPriv
            username no
              Username for SNMPv3, required if version is 3
              version yes
              • 2c
              • 3
              SNMP Version to use, 2c or 3

              Important

              Requires nelsnmp

              Examples


              # Get device info with SNMPv2
              - snmp_device_version: host={{ inventory_hostname }} version=2c community=public
              
              # Get device info with SNMPv3
              - cisco_snmp_save_config:
                  host={{ inventory_hostname }}
                  version=3
                  level=authPriv
                  integrity=sha
                  privacy=aes
                  username=snmp-user
                  authkey=abc12345
                  privkey=def6789